import React from 'react'
import qs from 'qs'
import { useParams, useLocation } from 'react-router-dom'

export default function RankingCon() {
  const location = useLocation()
  /* const arr = location.search.split('?')[1].split('&') //[id=1, name=ifer]
  const obj = {}
  for (let i = 0; i < arr.length; i++) {
    const tempArr = arr[i].split('=') // id 1, name ifer
    obj[tempArr[0]] = tempArr[1]
  } */
  const obj = qs.parse(location.search.slice(1)) // key=v&key=v
  // console.log(obj)
  return <div>RankingCon: {obj.id}</div>
}
